<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="__CSS__/ex/common.css">
    <link rel="stylesheet" href="__CSS__/ex/login.css">
    <title>个人资料</title>
    <script src="__JS__/ios-web-app.js"></script>
</head>

<body>
    <header class="normal_header">
        <div class="header_pic">
            <a href="{:U('user/index')}"><img src="__IMG__/ex/back_black.png" alt=""></a>
        </div>
        <p>Thông tin cá nhân</p>
        <div class="header_pic"></div>
    </header>
    <section class="change_content">
        <ul class="change_ul">
            <li class="touxiang">
                <p>Ảnh đại diện</p>
                <div class="flexFirst">
                    <div class="user_pic">
                        <if condition="$data.headimgurl eq ''">
                            <img src="__IMG__/ex/exlogo1.png" alt=""/>
                            <else />
                            <img src="{$data.headimgurl}" alt="">
                        </if>
                    </div>
                    <img src="__IMG__/ex/right.png" alt="">
                </div>
            </li>
            <li>
                <p>Tên</p>
                <span>{$data.username}</span>
                <!--<input type="text" class="txtright" id="truename" value="{$data.username}" />-->
                <!--<img src="__IMG__/ex/right.png" alt="">-->
            </li>
            <li>
                <p>Số điện thoại</p>
                <span>{$data.phone}</span>
                <!--<input type="text" class="txtright" id="phone" value="{$data.phone}" />-->
                <!--<img src="__IMG__/ex/right.png" alt="">-->
            </li>
            <li>
                <p>Ngày đăng kí</p>
                <span>{$data['create_time']|date="Y-m-d H:i:s",###}</span>
                <!--<p class="register_time">{$data['create_time']|date="Y-m-d",###}</p>-->
            </li>
            <a href="{:U('user/address_info')}">
                <li>
                    <p>Địa chỉ thông tin</p>
                    <img src="__IMG__/ex/right.png" alt="">
                </li>
            </a>
        </ul>
        <div class="logout">
            Đăng xuất
        </div>
    </section>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    <script>
        $('#sub').click(function () {
            $.ajax({
                type: "post",
                url: "{:U('User/user_info')}",
                data: {
                    zfb: $('#zfb').val(),
                    bank_name: $('#bank_name').val(),
                    bank_num: $('#bank_num').val(),
                    truename: $('#truename').val(),
                    id: $('#id').val(),
                },
                dataType: "json",
                success: function (data) {
                    if (data.code == 1) {
                        alert(data.msg);
                    } else {
                        alert(data.msg);
                        window.location.href = data.data;
                    }
                }
            });
        });
        $('.logout').click(function () {
            window.location.href = "{:U('Public/getOut')}"
        })
    </script>
</body>

</html>